﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using ZLDC.Common.Estate;

namespace ZLDC.DAL.Estate
{
     public class T_SYS_COL
    {
         public static DataTable p_sys_col_detail_table(string tname, int mark, _Database db)
         {
             List<SqlParameter> parms = new List<SqlParameter>();

             parms.Add(new SqlParameter("@tname", tname));
             parms.Add(new SqlParameter("@mark", mark));
             SqlParameter pRetval = new SqlParameter("@retval", SqlDbType.Int, 4);
             pRetval.Direction = ParameterDirection.ReturnValue;
             parms.Add(pRetval);

             DataTable dt = null;
             dt = db.GetDataTable("p_sys_col_detail", parms);

             int retval = (pRetval.Value == System.DBNull.Value) ? 0 : Convert.ToInt32(pRetval.Value);

             return dt;
         }
         
                  public static DataSet p_sys_col_list_table(string condition, _Database db)
         {
             DataSet ds = null;
             try
             {
                 string strsql = "select * from t_sys_col " + condition;
                 
                 ds = db.Query(strsql);

             }catch 
             {
             
             }finally
             {
               db.close();
             }
           
             return ds;
           
         }
    }
}
